import { ajax } from "@/utils/request";


export function getDataFn(){
    return ajax({
        url:'/products',
        method:'get'
    }
    )
}


//app.get('/api/shopproducts/:id',id

export function shopprosFn(id?:number){
    return ajax({
        url:'/shopproducts/' + id,  //'/api/shopproducts/:id' 这个请求路径怎么写 
        method:'get'
    }
    )
}

//api/shopproducts
export function allprosFn(){
    return ajax({
        url:'/shopproducts' ,
        method:'get'
    }
    )
}